/*
 * Copyright 2013 NJUT  qixiaobo. All rights reserved.
 */
package com.fujitsu.nanjing.tieba.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.fujitsu.nanjing.tieba.base.BaseService;
import com.fujitsu.nanjing.tieba.ibator.CoreModeratorLog;
import com.fujitsu.nanjing.tieba.ibator.CoreModeratorLogCriteria;
import com.fujitsu.nanjing.tieba.model.ModeratorLog;

/**
 * ModeratorLog.java
 * 
 * @author Administrator
 */
@Transactional
@Service
public class ModeratorLogService
		extends
			BaseService<CoreModeratorLog, CoreModeratorLogCriteria> {
	@Resource
	private ModeratorLog moderatorLog;
	@Override
	public CoreModeratorLog findById(String id) {
		return moderatorLog.selectByPrimaryKey(Integer.parseInt(id));
	}

	@Override
	public CoreModeratorLog insert(CoreModeratorLog t) {
		moderatorLog.insertSelective(t);
		return t;
	}

	@Override
	public void update(CoreModeratorLog t) {
		moderatorLog.updateByPrimaryKeySelective(t);

	}

	@Override
	public void delete(CoreModeratorLog t) {
		moderatorLog.deleteByPrimaryKey(t.getLogid());

	}
}
